facebook_check_permission


语法:

facebook_check_permission(permission)

参数 描述
permission The permission you want to check (a string).


返回:

Real(实数)


描述

With this function you can check the Facebook API to see if the user has granted a specific permission, either read or publish. The function will return true if they have the permission or false if they do not or there is an error. Note that the user must be logged in for the check to function.


例如:

var permissions = ds_list_create();
if !facebook_check_permission("user_likes")
   {
   ds_list_add(permissions, "user_likes");
   }
if !facebook_check_permission("user_interests")
   {
   ds_list_add(permissions, "user_interests");
   }
if !ds_list_empty(permissions)
   {
   request_ID = facebook_request_read_permissions(permissions);
   }
ds_list_destroy(permissions);

The above code checks some of the Facebook read permissions, and if the game has not requested them, a request is sent.